package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLGraphics;
import HLLib.base.HLString;
import HLLib.control.HLTextPageOld;

public class HLClassTextPageOld extends HLLibClass {
    public HLClassTextPageOld(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLTextPageOld();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            ((HLTextPageOld) self).SetSize(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 1: {
            ((HLTextPageOld) self).SettingNormal(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7), args.GetInt(8));
            break;
        }
        case 2: {
            ((HLTextPageOld) self).SettingPage(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7), args.GetInt(8));
            break;
        }
        case 3: {
            ((HLTextPageOld) self).SettingThrough(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7), args.GetInt(8), args.GetInt(9), args.GetInt(10));
            break;
        }
        case 4: {
            ((HLTextPageOld) self).SetText((HLString)args.GetObject(0));
            break;
        }
        case 5: {
            ((HLTextPageOld) self).AdjustToAllTextHeight();
            break;
        }
        case 6: {
            ((HLTextPageOld) self).AdjustToPageHeight();
            break;
        }
        case 7: {
            ((HLTextPageOld) self).AdjustToAllTextWidth();
            break;
        }
        case 8: {
            ((HLTextPageOld) self).Clear();
            break;
        }
        case 9: {
            if (resultOwnerObject == null) {
                ((HLTextPageOld) self).LineCount();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLTextPageOld) self).LineCount());
            }
            break;
        }
        case 10: {
            if (resultOwnerObject == null) {
                ((HLTextPageOld) self).LineInPageCount();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLTextPageOld) self).LineInPageCount());
            }
            break;
        }
        case 11: {
            if (resultOwnerObject == null) {
                ((HLTextPageOld) self).PageCount();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLTextPageOld) self).PageCount());
            }
            break;
        }
        case 12: {
            if (resultOwnerObject == null) {
                ((HLTextPageOld) self).NextStep();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLTextPageOld) self).NextStep());
            }
            break;
        }
        case 13: {
            if (resultOwnerObject == null) {
                ((HLTextPageOld) self).PreStep();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLTextPageOld) self).PreStep());
            }
            break;
        }
        case 14: {
            if (resultOwnerObject == null) {
                ((HLTextPageOld) self).NextLine();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLTextPageOld) self).NextLine());
            }
            break;
        }
        case 15: {
            if (resultOwnerObject == null) {
                ((HLTextPageOld) self).PreLine();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLTextPageOld) self).PreLine());
            }
            break;
        }
        case 16: {
            if (resultOwnerObject == null) {
                ((HLTextPageOld) self).NextPage();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLTextPageOld) self).NextPage());
            }
            break;
        }
        case 17: {
            if (resultOwnerObject == null) {
                ((HLTextPageOld) self).CurLineIndex();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLTextPageOld) self).CurLineIndex());
            }
            break;
        }
        case 18: {
            if (resultOwnerObject == null) {
                ((HLTextPageOld) self).CurPageIndex();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLTextPageOld) self).CurPageIndex());
            }
            break;
        }
        case 19: {
            if (resultOwnerObject == null) {
                ((HLTextPageOld) self).PrePage();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLTextPageOld) self).PrePage());
            }
            break;
        }
        case 20: {
            if (resultOwnerObject == null) {
                ((HLTextPageOld) self).Logic();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLTextPageOld) self).Logic());
            }
            break;
        }
        case 21: {
            ((HLTextPageOld) self).Render((HLGraphics)args.GetObject(0), args.GetInt(0), args.GetInt(1));
            break;
        }
        case 22: {
            ((HLTextPageOld) self).RenderAdjustable((HLGraphics)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4));
            break;
        }
        case 23: {
            if (resultOwnerObject == null) {
                ((HLTextPageOld) self).Clone();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLTextPageOld) self).Clone());
            }
            break;
        }
        }
    }
}
